package com.dts.evaluate.ui.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.dts.evaluate.R;
import com.dts.evaluate.bean.IssueBulletinDataBean;
import com.dts.evaluate.common.Constants;
import com.dts.evaluate.ui.view.TitleView;

import butterknife.Bind;
import butterknife.ButterKnife;

public class DepartBroadDetailActivity extends BaseActivity {


    @Bind(R.id.title_view)
    TitleView titleView;
    @Bind(R.id.bulletin_title_textview)
    TextView bulletinTitleTextview;
    @Bind(R.id.content_textview)
    TextView contentTextview;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_depart_broad_detail);
        ButterKnife.bind(this);

        //设置titleView返回监听
        titleView.setOnBackClickListener(new TitleView.OnBackClikListener() {
            @Override
            public void onTitleViewClik(View v) {
                finish();
            }
        });

        IssueBulletinDataBean.IssueBulletinBean issueBulletinBean = (IssueBulletinDataBean.IssueBulletinBean) getIntent().getSerializableExtra(Constants.ISSUE_BULLETIN_BEAN);
        if (issueBulletinBean == null) {
            return;
        }
        String title = issueBulletinBean.getBulletintitle();
        String content = issueBulletinBean.getBulletinDesc();

        bulletinTitleTextview.setText(title);
        contentTextview.setText(content);
    }
}
